using Tools.Domain.Specifications;
using Webshop20.Domain.Catalog.Core.Products;
using Webshop20.Domain.Shared.Products.Core;

namespace Webshop20.Domain.Catalog.Specifications
{
    public class MinimumPriceSpecification : Specification<Product>
    {
        public decimal? MinimumPrice { get; private set; }

        public MinimumPriceSpecification(decimal? minimumPrice)
            : base(product => product.NetPrice >= minimumPrice, "MINIMUM_PRICE_NOT_MATCHED")
        {
            MinimumPrice = minimumPrice;
        }
    }
}